<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	
<div>
 <p>ssssssssssssssssss</p>

</div>

	<script type="text/javascript">
		document.onkeydown = function(){

		    if(window.event && window.event.keyCode == 123) {
		        alert("F12被禁用");
		        event.keyCode=0;
		        event.returnValue=false;
		    }
		    if(window.event && window.event.keyCode == 13) {
		        window.event.keyCode = 505;
		    }
		    if(window.event && window.event.keyCode == 8) {
		        alert(str+"\n请使用Del键进行字符的删除操作！");
		        window.event.returnValue=false;
		    }

		}
	</script>
</body>
</html>